package com.allen.retrofit2_rxjava2.activity;

import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.allen.retrofit2_rxjava2.R;
import com.allen.retrofit2_rxjava2.base.BaseActivity;
import com.allen.retrofit2_rxjava2.view.CenterRadioButton;
import com.allen.retrofit2_rxjava2.view.DragDeleteView;
import com.allen.retrofit2_rxjava2.view.NoScrollViewPager;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 拖动删除效果
 * Created by Administrator on 2019/8/9.
 */

public class DragDeleteActivity extends BaseActivity implements DragDeleteView.Callback {


    @BindView(R.id.tv_delete)
    TextView tv_delete;

    @BindView(R.id.drag)
    DragDeleteView drag;

    @Override
    public void init() {
        setContentView(R.layout.activity_dragdelete);
    }

    @Override
    public void data() {
        DragDeleteView.attach(tv_delete, this);
    }

    @OnClick({R.id.tv_delete, R.id.drag})
    public void clickBtn(View view) {
        switch (view.getId()) {
            case R.id.tv_delete:
                showToast("删除的区域");
                break;
            case R.id.drag:
                showToast("拖动删除的view");
                break;
        }


    }

    @Override
    public void onDelete() {
        showToast("被拖拽删除了");
    }
}
